package com.lagou.edu;

public abstract class HttpServlet implements Servlet{

    public abstract void doget(Request request, Response response);

    public abstract void dopost(Request request, Response response);

    @Override
    public void service(Request request, Response response) throws Exception {
        if("GET".equalsIgnoreCase(request.getMethod())){
            doget(request,response);
        }else{
            dopost(request,response);
        }
    }
}
